using System;
using System.Collections;
using System.Collections.Generic;

using MemberMgr.Data.Base;

namespace MemberMgr.Data.BusinessObjects
{
    public partial class tProduct : BusinessBase<uint>
    {
        #region Declarations

		private string _productname = String.Empty;
		private string _producttype = String.Empty;
		private string _maker = String.Empty;
		private decimal _price = default(Decimal);
		private string _comment = String.Empty;
		
		
		private IList<tConsumptionDetail> _tConsumptionDetails = new List<tConsumptionDetail>();
		private IList<tProductInlog> _tProductInlogs = new List<tProductInlog>();
		private IList<tProductOutlog> _tProductOutlogs = new List<tProductOutlog>();
		
		#endregion

        #region Constructors

        public tProduct() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_productname);
			sb.Append(_producttype);
			sb.Append(_maker);
			sb.Append(_price);
			sb.Append(_comment);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

		public virtual string Productname
        {
            get { return _productname; }
			set
			{
				OnProductnameChanging();
				_productname = value;
				OnProductnameChanged();
			}
        }
		partial void OnProductnameChanging();
		partial void OnProductnameChanged();
		
		public virtual string Producttype
        {
            get { return _producttype; }
			set
			{
				OnProducttypeChanging();
				_producttype = value;
				OnProducttypeChanged();
			}
        }
		partial void OnProducttypeChanging();
		partial void OnProducttypeChanged();
		
		public virtual string Maker
        {
            get { return _maker; }
			set
			{
				OnMakerChanging();
				_maker = value;
				OnMakerChanged();
			}
        }
		partial void OnMakerChanging();
		partial void OnMakerChanged();
		
		public virtual decimal Price
        {
            get { return _price; }
			set
			{
				OnPriceChanging();
				_price = value;
				OnPriceChanged();
			}
        }
		partial void OnPriceChanging();
		partial void OnPriceChanged();
		
		public virtual string Comment
        {
            get { return _comment; }
			set
			{
				OnCommentChanging();
				_comment = value;
				OnCommentChanged();
			}
        }
		partial void OnCommentChanging();
		partial void OnCommentChanged();
		
		public virtual IList<tConsumptionDetail> TConsumptionDetails
        {
            get { return _tConsumptionDetails; }
            set
			{
				OnTConsumptionDetailsChanging();
				_tConsumptionDetails = value;
				OnTConsumptionDetailsChanged();
			}
        }
		partial void OnTConsumptionDetailsChanging();
		partial void OnTConsumptionDetailsChanged();
		
		public virtual IList<tProductInlog> TProductInlogs
        {
            get { return _tProductInlogs; }
            set
			{
				OnTProductInlogsChanging();
				_tProductInlogs = value;
				OnTProductInlogsChanged();
			}
        }
		partial void OnTProductInlogsChanging();
		partial void OnTProductInlogsChanged();
		
		public virtual IList<tProductOutlog> TProductOutlogs
        {
            get { return _tProductOutlogs; }
            set
			{
				OnTProductOutlogsChanging();
				_tProductOutlogs = value;
				OnTProductOutlogsChanged();
			}
        }
		partial void OnTProductOutlogsChanging();
		partial void OnTProductOutlogsChanged();
		
        #endregion
    }
}
